//
// Created by ChaoDONG on 2021-03-17.
//

/* shoes2.c -- calculates foot lengths for several sizes */

/* shoes2.c -- 计算多个不同鞋码对应的脚长 */

#include <stdio.h>

#define ADJUST 7.31 // one kind of symbolic constant

int main(void){

    const double SCALE = 0.333; // another kind of symbolic constant

    double shoe, foot;

    printf("Shoe size (men's) foot length\n");

    shoe = 3.0;

    while (shoe < 18.5) /* starting the while loop */

    { /* start of block */

        foot = SCALE * shoe + ADJUST;

        printf("%-10.1f %15.2f inches\n", shoe, foot);

        shoe = shoe + 1.0;

    } /* end of block */

    printf("If the shoe fits, wear it.\n");

    return 0;
}